package com.yuan.java.reflect.normal;

import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;

/**
 * 被继承的类
 * Created by 袁恩光 on 2017/5/6.
 */
public abstract class BeanExtend<T> {

    private Class<T> classes;

    public BeanExtend() {
        Type genType = getClass().getGenericSuperclass();
        ParameterizedType type = (ParameterizedType) genType;
        Type[] params = type.getActualTypeArguments();
        classes = (Class<T>) params[0];
    }

}
